# encoding=utf-8
# author:梁子龙
# signals.py
from django.db.models.signals import post_save
from django.dispatch import receiver
from .models import UserModel, AddressModel


@receiver(post_save, sender=UserModel)
def create_or_update_user_profile(sender, instance, created, **kwargs):
    if created:
        print("create user profile")
        print("信号来了~~~~")
    else:
        print("信号没来~~~~~~~~~~~~")
